<!-- 暂时保留
{include file="pageheader.tpl"}
{insert_scripts files="../js/utils.js,listtable.js"}
<div class="form-divww">
<div class="form-div">
  <form action="javascript:searchUser()" name="searchForm">
    <img src="images/icon_search.gif" width="16" height="16" border="0" alt="SEARCH" />
    &nbsp;{$lang.label_rank_name} <select name="user_rank"><option value="0">{$lang.all_option}</option>{html_options options=$user_ranks }</select>
    &nbsp;{$lang.label_pay_points_gt}&nbsp;<input type="text" name="pay_points_gt" size="8" />&nbsp;{$lang.label_pay_points_lt}&nbsp;<input type="text" name="pay_points_lt" size="10" />
    &nbsp;{$lang.label_user_name} &nbsp;<input type="text" name="keyword" /> <input type="submit" class="button" value="{$lang.button_search}" />
  </form>
</div>
</div>
-->
<html>
<head>
<title>手机号码选择列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="templates2/styles/main2.css" />
<style type="text/css">
<!--
body {
	font-size: 12px;
}
#listForm #listDiv table {
	font-size: 12px;
}
-->
</style>
</head>
<body>

<p>{insert_scripts files="../js/utils.js,listtable.js"}
  
</p>
<form method="POST" action="" name="listForm" id="listForm">
<!-- start users list -->
<div class="list-div" id="listDiv">
<!--客户列表部分-->
<table cellpadding="0" cellspacing="0" class="smstab">
  <tr>
    <th>
      <input onclick='selectAll(this, "checkboxes")' type="checkbox">手机号码</a>
    </th>
    <th>用户名</th>
    <th>邮件地址</th>	
    <th>地址名称</th>
	<!-- 暂时保留
    <th>国家</th>
    <th>省份</th>
    <th>城市</th>
	-->
    <th>注册日期</th>
  <tr>
  {foreach from=$cellPhoneList item=cellphone }
  <tr>
    <td height="25"><input type="checkbox" name="checkboxes[]" value="{$cellphone.mobile_phone}" />{$cellphone.mobile_phone}&nbsp;</td>
    <td class="first-cell">{$cellphone.user_name}&nbsp;</td>
    <td>{$cellphone.email}&nbsp;</td>	
    <td>{$cellphone.address_name}&nbsp;</td>
	<!-- 暂时保留
    <td>{$cellphone.country}</td>
    <td>{$cellphone.province}</td>
    <td>{$cellphone.city}</td>
	-->
    <td align="center">{$cellphone.reg_time}&nbsp;</td>
  </tr>
  {/foreach}
  <tr>
      <td height="45" colspan="5" align="center"><input type="button" class="button" name="select" value="选择手机号码" onClick="inputCellPhone()"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" class="button" name="close" value="关闭窗口" onClick="javascript:window.close(); "/></td>
  </tr>
</table>
</div>
</form>

<script type="text/javascript" language="JavaScript">

function inputCellPhone(){
  var cellPhone_list = '';	
  var elems = document.getElementsByTagName("INPUT");
  var j = 0;
  for (var i=0; i < elems.length; i++)
  {
    if (elems[i].name == 'checkboxes' || elems[i].name == 'checkboxes' + "[]")
    {
       if(elems[i].checked){
	      cellPhone_list += elems[i].value + ',';
		  if(++j%2==0)
		    cellPhone_list += '\n';
		}
    }
  }
  if(cellPhone_list != ''){
  	//document.getElementById('msg_content').value
    window.opener.document.getElementById('cell_number').value = cellPhone_list;
  	//window.opener.document.theForm.cell_number.innerHTML = cellPhone_list;
  }else{
	alert('请选择至少一个手机号码！');
  }
}

function selectAll(obj, chk)
{
  if (chk == null)
  {
    chk = 'checkboxes';
  }

  var elems = obj.form.getElementsByTagName("INPUT");

  for (var i=0; i < elems.length; i++)
  {
    if (elems[i].name == chk || elems[i].name == chk + "[]")
    {
      elems[i].checked = obj.checked;
    }
  }
}

</script>
</body>
<!-- end users list 
<script type="text/javascript" language="JavaScript">
<!--
listTable.url = "./users.php?is_ajax=1";
listTable.recordCount = {$record_count};
listTable.pageCount = {$page_count};

{foreach from=$filter item=item key=key}
listTable.filter.{$key} = '{$item}';
{/foreach}

{literal}
onload = function()
{
    document.forms['searchForm'].elements['keyword'].focus();
    // 开始检查订单

    startCheckOrder();
}

/**
 * 搜索客户
 */
function searchUser()
{
    listTable.filter['keywords'] = Utils.trim(document.forms['searchForm'].elements['keyword'].value);
    listTable.filter['rank'] = document.forms['searchForm'].elements['user_rank'].value;
    listTable.filter['pay_points_gt'] = Utils.trim(document.forms['searchForm'].elements['pay_points_gt'].value);
    listTable.filter['pay_points_lt'] = Utils.trim(document.forms['searchForm'].elements['pay_points_lt'].value);
    listTable.filter['page'] = 1;
    listTable.loadList();
}</script>
//-->

